Skip to content

feat: add generic Call-to-Action section block#48

Merged
jhb-dev merged 5 commits into
mainfrom
feat/call-to-action-block
Jul 1, 2026
Merged

feat: add generic Call-to-Action section block#48
jhb-dev merged 5 commits into
mainfrom
feat/call-to-action-block

Conversation

@jhb-dev

@jhb-dev jhb-dev commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a generic Call-to-Action section block — a reusable "heading + text + link buttons" block for any promo that points the visitor somewhere (podcast, newsletter, external profiles, "book a call", …). Rather than hard-coding a single use case, it exposes a localized title/description and an array of links, each with its own label, URL, icon, and button style, so it can be reused across pages.

Changes

CMS (Payload)

  • cms/src/blocks/CallToActionBlock.ts — new block (slug: call-to-action) with localized title, description, and a required links array (label, url, per-link icon and style).
  • cms/src/collections/Pages.ts — register the block in the Pages blocks list.
  • cms/src/payload-types.ts — regenerated types for the new block.

Web (Astro)

  • web/src/components/blocks/CallToActionBlock.astro — frontend rendering (heading, description, and a list of styled link buttons with optional icons; links open in a new tab with rel="noopener noreferrer").
  • web/src/components/SectionBlock.astro — wire up the call-to-action case.
  • web/src/components/icons/Icon.astro + new icons (spotify.svg, apple-podcasts.svg, globe.svg) — support the new icon options.
  • web/src/integrations/htmlToMarkdown.ts — handle the block in markdown output.

Note

There is no separate "podcast block" — the podcast CTA use case is intended to be covered by this generic block via the per-link icons (Spotify / Apple Podcasts / globe) and button styles.

🤖 Generated with Claude Code


Generated by Claude Code

jhb-dev and others added 2 commits June 27, 2026 17:15
Add a reusable Call-to-Action block (heading + description + a
configurable list of link buttons) for the page section system, plus
spotify, apple-podcasts and globe outline icons.

Each link supports a label, URL, optional icon and button style; the
Astro component reuses the existing buttonStyles helper for consistency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JwSAfFX2ENovr21t5TkeM
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
website Ignored Ignored Jul 1, 2026 5:21pm
website-cms Ignored Ignored Jul 1, 2026 5:21pm

Request Review

@jhb-dev jhb-dev changed the title feat(blocks): add generic Call-to-Action section block feat: add generic Call-to-Action section block Jul 1, 2026
claude added 3 commits July 1, 2026 17:01
Reuse the shared isValidURL helper (URL-class based, http/https only) to
validate the url field on each call-to-action link, matching the pattern
already used on the Customers collection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01622xFmFcFwejfHXk54uWvp
A custom validate replaces Payload's built-in text validation, so the
`required: true` presence check no longer runs on its own. Handle the
empty case explicitly (honoring the field's required option) so a missing
URL reports "URL is required" instead of the misleading "Invalid URL".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01622xFmFcFwejfHXk54uWvp
@jhb-dev
jhb-dev merged commit 3318e11 into main Jul 1, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants